<template>
	<view>
		<view class="uni-container">
			<uni-table ref="table" :loading="loading" border  emptyText="暂无更多数据" @selection-change="selectionChange">
				<uni-tr>
					<uni-th width="100" align="center">报修情况</uni-th>
					<uni-th width="100" align="center">日期</uni-th>
					<uni-th width="50" align="center">设置</uni-th>
				</uni-tr>
				<uni-tr v-for="(item, index) in tableData" :key="index">
					<uni-td class="name" align="center">{{ item.name }}</uni-td>
					<uni-td>
						<view align="center">{{ item.date }}</view>
					</uni-td>
					<uni-td>
						<view class="uni-group">
							<button class="uni-button" size="mini" type="primary">增加</button>
						</view>
					</uni-td>
				</uni-tr>
			</uni-table>
		</view>
	</view>
</template>

<script>
		import {reactive,toRefs,watch} from 'vue';
		export default{
			setup(){
				let data = reactive({
					           searchVal: '',
								tableData: [
									{
									    "date": "2020-09-01",
									    "name": "灯坏",
									   
									}, {
									    "date": "2020-09-02",
									    "name": "灯",
									   
									}, {
									    "date": "2020-09-03",
									    "name": "坏",
									    
									}
								],
								// 每页数据量
								pageSize: 10,
								// 当前页
								pageCurrent: 1,
								// 数据总量
								total: 0,
								loading: false
				})
				return { ...toRefs(data)}
			},
		
		}
</script>

<style>
/* #ifndef H5 */
/* page {
	padding-top: 85px;
} */
/* #endif */
.uni-group {
	display: flex;
	align-items: center;
}
</style>
